From: Antigravity Date: Thu, 6 Aug 2026 11:30:12 +0000 (+0200) Subject: Disable -fstack-protector on alpha architecture X-Git-Tag: archive/raspbian/2023.1.0-2+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi//%22https:/green-site//%22http:/www.example.com/cgi/%22https:/green-site/?a=commitdiff_plain;h=1069769777551304c737c236ac9728cf3bb37d15;p=onetbb.git Disable -fstack-protector on alpha architecture Forwarded: not-needed CMake hardcodes -fstack-protector-strong for GNU and Clang compilers, which overrides dpkg-buildflags and causes build failures on alpha. Gbp-Pq: Name alpha-no-fstack-protector.patch --- diff --git a/cmake/compilers/Clang.cmake b/cmake/compilers/Clang.cmake index 3f9bdb5..5b58a2f 100644 --- a/cmake/compilers/Clang.cmake +++ b/cmake/compilers/Clang.cmake @@ -75,7 +75,10 @@ set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-security -Werror=format-security $<$:-D_CRT_SECURE_NO_WARNINGS> $<$>:-fPIC> - $<$>:-fstack-protector-strong>) + ) +if (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "alpha") + set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$>:-fstack-protector-strong>) +endif() if (NOT APPLE AND NOT ANDROID_PLATFORM AND CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)" AND NOT WIN32) set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} -fstack-clash-protection) diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake index 5fb8e5a..b15ffa0 100644 --- a/cmake/compilers/GNU.cmake +++ b/cmake/compilers/GNU.cmake @@ -109,7 +109,10 @@ endif () # Gnu flags to prevent compiler from optimizing out security checks set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv) set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-security -Werror=format-security - -fstack-protector-strong ) + ) +if (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "alpha") + set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -fstack-protector-strong) +endif() if (CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)" AND NOT EMSCRIPTEN) set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} $<$>:-fcf-protection=full>) endif ()